package com.cskt.petproject178.controller;

import com.cskt.petproject178.pojo.vo.ProductAttributeLevel1VO;
import com.cskt.petproject178.pojo.vo.ResultVO;
import com.cskt.petproject178.service.ProductCategoryAttributeRelService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 27013
 **/

@RestController
@RequestMapping(value = "/pms/product/attribute")
public class ProductAttributeController {
    @Resource
    private ProductCategoryAttributeRelService productCategoryAttributeRelService;
    @PostMapping(value = "/byCategoryIds")
    public ResultVO<List<ProductAttributeLevel1VO>> getAttributeByCategoryIds( @RequestBody List<Long> productLevel2CategoryId) {
        List<ProductAttributeLevel1VO> productAttributeLevel1VOS = productCategoryAttributeRelService.selectProductAttributeLevel1VOList(productLevel2CategoryId);
        return ResultVO.OK(productAttributeLevel1VOS);
    }
}
